import { computed } from 'vue';

const showVideo = computed(() => (item: any,page:string,is_video_img:boolean): string => {
	let video_cover_img: string = '';
	let video_path: string = '';
	if (page == 'member') {
		video_cover_img = (item.vcr.imgs || item.user_img)
		video_path = item.vcr.video_url
	}
	if (page == 'red_mother') {
		video_cover_img = item.red_mother_vcr.imgs
		video_path = item.red_mother_vcr.video_url
	}
	if (page == 'store') {
		video_cover_img = item.store_auth_vcr.imgs
		video_path = item.store_auth_vcr.video_url
	}
	if (is_video_img) {
		return video_cover_img;
	} else {
		return video_path;
	}
});

export default showVideo;
